﻿@model com.qt.lib.domain.Entity.Order

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Order</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.OrderDateTime)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.OrderDateTime)
            @Html.ValidationMessageFor(model => model.OrderDateTime)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DeliveryDateTime)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DeliveryDateTime)
            @Html.ValidationMessageFor(model => model.DeliveryDateTime)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ProductPrice)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ProductPrice)
            @Html.ValidationMessageFor(model => model.ProductPrice)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.SalePrice)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.SalePrice)
            @Html.ValidationMessageFor(model => model.SalePrice)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TotalPrice)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TotalPrice)
            @Html.ValidationMessageFor(model => model.TotalPrice)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Staff)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Staff)
            @Html.ValidationMessageFor(model => model.Staff)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CustomerId, "Customer")
        </div>
        <div class="editor-field">
            @Html.DropDownList("CustomerId", String.Empty)
            @Html.ValidationMessageFor(model => model.CustomerId)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
